package com.Enum;


public enum OperateType {
	Add(1, "添加"), Answer(4, "回答"), Focus(7, "关注"), Collection(10, "收藏"), Loved(13, "赞");

	private final int val;
	private final String desc;

	OperateType(int val, String desc) {
		this.val = val;
		this.desc = desc;
	}

	public int getIntValue() {
		return val;
	}

	public String toString() {
		return desc;
	}

	public static OperateType getByIntValue(int v) {
		switch (v) {
		case 1:
			return Add;
		case 4:
			return Answer;
		case 7:
			return Focus;
		case 10:
			return Collection;
		case 13:
			return Loved;
		default:
			return null;
		}
	}
}
